#ifndef EKRAN_FLAG_H
#define EKRAN_FLAG_H

#include <QWidget>
#include <QJsonObject>
#include <QHBoxLayout>
#include <QSettings>
#include <QLabel>
#include <QPushButton>
#include <QTimer>
#include <QTime>
#include <QShortcut>

namespace Ui {
class ekran_flag;
}

class ekran_flag : public QWidget
{
    Q_OBJECT
    #define ORGANIZATION_NAME "ISAP"
    #define ORGANIZATION_DOMAIN "www.poomsae.ru"
    #define APPLICATION_NAME "ISAP"

    #define SETTINGS_KSUD "settings/ksud"

public:
    explicit ekran_flag(QWidget *parent = nullptr);
    ~ekran_flag();

private slots:
    void recieveDataFlag(QJsonObject json);
    void recieveOcenFlag(QJsonObject totalObj);
    void runLine();

private:
    Ui::ekran_flag *ui;
    QSettings *settings;
    QHBoxLayout* groupsGrades[1];
    QPushButton *flagsBtn[7];
    int countJudges;
    int show = 0, wEkran = 0, m_shift = 0;
    QTimer *tmrLine;
};

#endif // EKRAN_FLAG_H
